package com.astrob.model;

import java.io.Serializable;

import com.astrob.NavFrameSDK;
import com.astrob.NavFrameSDK.RouteOption;

public class SystemSetData implements Serializable {
	private static final long serialVersionUID = 1L;

	// Home
	public double homeLon = LonLat.INVALID_LON;
	public double homeLat = LonLat.INVALID_LAT;

	public void setHome(LonLat pos) {
		homeLon = pos.GetLon();
		homeLat = pos.GetLat();
	}

	public LonLat getHome() {
		return new LonLat(homeLon, homeLat);
	}

	// Company
	public double companyLon = LonLat.INVALID_LON;
	public double companyLat = LonLat.INVALID_LAT;

	public void setCompany(LonLat pos) {
		companyLon = pos.GetLon();
		companyLat = pos.GetLat();
	}

	public LonLat getCompany() {
		return new LonLat(companyLon, companyLat);
	}

	// navi setting
	public boolean voiceNavi = true;
	public boolean speedcamera = true;
	public int naviMapViewMode = 0; // 0 --- 2D 1 --- 3D
	public int naviCarposMode = 0; // BOTTOMCENTER = 0, CENTER = 1
	public boolean securityNaviVoice = true; // 新手安全导航语音
	public boolean SCVoice = true; // 本地电子眼语音（SC.SMF?)
	public boolean opertionSound = true; // 操作音
	public double naviScale = 100000; // 导航比例尺
	public boolean favoritesSound = true; // 收藏夹语音
	public boolean reRounteCalSound = true; // 重新路径演算语音
	public boolean SpeedWarning = true; // 超速警语音
	public int languageNaviVoice = 1; // 1--普通话导航 2--粤语

	public int speedLimitHWIndex = 1; // 高速 120, 140, 160, 180
	public int speedLimitGDIndex = 1; // 国道 80, 100, 120, 140
	public int speedLimitPMIndex = 1; // 其他道路 70, 80, 90, 100, 120

	// 日夜切换
	public int DNMode = 2; // 日夜间模式 1--day 0--night 2 -- 自动
	public int mapstyle = 11; // 地图风格设置值，day*10+night，如日间选择1，夜间选择2时，mapstyle的值为12
	// < 4）
	public int carstyle = 3; // 车标风格 0, 1, 2, 3, 4

	// route setting
	public int carType = 0; // 0-机动车 1-行人 2-非机动车
	public boolean turnRestriction = true; // 转弯限制
	public boolean fastest = true; // 最快路径（推荐路径 ）
	public boolean toll = false; // false -- 可以走收费站
	public boolean highway = true; // 高速公路优先（平面道路）
	public boolean ferry = true; // 可以走轮渡

	// 图层设定
	public boolean showTMC = true; // 显示实时路况
	public boolean showTSP = true; // 显示路况看板
	public boolean showFav = true; // 显示收藏点
	public boolean showSC = true; // 显示电子眼
	public boolean showMsn = true; // 显示车友位置

	public boolean havePic = false; // 是否有照片导航

	// 操作流程设定
	public boolean showRCV = true; // 演算前显示RouteCalView
	public boolean showSearchMenu = true; // 查询前显示 查询menu

	// 实时路况设置
	public boolean useTSP = true; // 实时路况功能
	public boolean TMCing = true; // 道路通行能力显示
	// 暂时不用，与showTMC功能相同
	public boolean Eventing = true; // 交通事件显示
	public boolean EventFVing = true; // 自由导航临时事件播报
	public boolean EventSVing = true; // 播报选中的事件信息
	public int updateTspTime = 5 * 60; // 刷新频率 -- 5分钟

	// carClub Setting
	public boolean isAutoJoinClub = true;
	public boolean isAutoPupoMeg = true;
	public boolean isAutoPupoDes = true;

	// 4S setting
	public boolean isRejectBYXX = true;
	public boolean isRejectCXTS = true;
	public boolean isRejectYHXX = true;
	public boolean isRejectOther = true;

	// 微博设置 1 是新浪， 2 是qq ， 0 是未设置
	public int qqORsina = 0;

	// 行程管理演算完成后立即显示routeinfo
	public boolean isRouteManage = false;

	public RouteOption getRouteOption() {
		RouteOption routeOption = NavFrameSDK.getInstance().new RouteOption();
		routeOption.bFastest = fastest;
		routeOption.bFerry = ferry;
		routeOption.bHighway = highway;
		routeOption.bToll = toll;
		routeOption.bTurnLimit = turnRestriction;
		return routeOption;
	}

	public RouteOption getRouteOption(boolean isFast) {
		fastest = isFast;
		RouteOption routeOption = NavFrameSDK.getInstance().new RouteOption();
		routeOption.bFastest = fastest;
		routeOption.bFerry = ferry;
		routeOption.bHighway = highway;
		routeOption.bToll = toll;
		routeOption.bTurnLimit = turnRestriction;
		return routeOption;
	}

	// 现在地
	public double previewLon = 103.845275;
	public double previewLat = 1.291623;

	// 最后选择的国家
	public String preCountryId = "SGP";

	public void setPreview(LonLat pos) {
		previewLon = pos.GetLon();
		previewLat = pos.GetLat();
	}

	public LonLat getPreview() {
		return new LonLat(previewLon, previewLat);
	}

	public double navRealStartLon = LonLat.INVALID_LON;
	public double navRealStartLat = LonLat.INVALID_LAT;

	public void setNavRealStart(LonLat pos) {
		navRealStartLon = pos.GetLon();
		navRealStartLat = pos.GetLat();
	}

	public LonLat getNavRealStart() {
		return new LonLat(navRealStartLon, navRealStartLat);
	}

	public String nameRealStart = "";

	// Query
	public int queryowner = 110000;
	public String querycity = "北京市";
	public LonLat queryll = new LonLat(previewLon, previewLat);

	public int fromDN = 8; // [3~9]
	public int toDN = 18; // [17~22]
	public int language = 0; // china = 0, english

	public boolean isStartReNavi = false; // 开机自动继续导航 开启：不提示，继续导航，，，关闭：弹出消息提示
	public boolean isShowCurRoad = false; // 显示当前道路和车速

	public boolean isSaveMapScreenMode = true; // 是否保存屏幕模式
	public int nMapScreenMode = 1;
	public boolean isYunEEyesSound = true; // 云端电子眼播报
	public boolean isFavEeyesSound = true; // 收藏电子眼播报

}
